<?php

namespace app\store\controller\setting;

use app\store\controller\Controller;
use app\store\model\Log as LogModel;

/**
 * 日志
 * Class Delivery
 * @package app\store\controller\setting
 */
class Log extends Controller
{
    /**
     * 日志列表
     * @return mixed
     * @throws \think\exception\DbException
     */
    public function index()
    {
        $model = new LogModel;
        $list = $model->getList();

        return $this->fetch('index', compact('list'));
    }

    /**
     * 查看日志内容
     * @return mixed
     * @throws \think\exception\DbException
     */
    public function view($log_id)
    {
        $model = LogModel::detail($log_id);
        return $this->fetch('view', compact('model'));
    }
}
